In Android development platform, you can get the native number via Telephonymanager. 1 telephonymanager phonemgr= (telephonymanager)this. Getsystemservice (Context.telephony_ SERVICE); 2 // txtPhoneNumber is a edittext used to display the phone numberNote:Depending on the security mechanism of Android, when using Telephonymanager, it must be in Androidmanifest.
In the android development platform, you can use telephonymanager to obtain local information.
Telephonymanager phonemgr = (telephonymanager) This. getsystemservice (context. telephony_service );Txtphonemodel. settext (build. model); // Mobile Phone ModelTxtphonenumber. settext (phonemgr. getline1number (); // local phone numberTxtsdkversion. settext (build. version. S
Yesterday the two managers were working properly, updated today, found unavailable, ran AVD manager and SDK Manager did not respond , searched a lot of articles, and then saw the next article " about the SDK update Android SDK Tools 25.3.1 version after using
Cause: After updating ADT and other support libraries in Sdksdk Manager, eclipse error: This Android SDK requires Android Developer Toolkit version 23.1 errors. But SDKSDK manager clearly shows that 23.1 of ADT is already installed, which is strange.Workaround: Help, Install New software, ADD->http://dl-ssl.google.com/
Solve the problem of This Android sdk requires Android Developer Toolkit version 23.1 After updating the file in SDK manager,
Cause: After the adt and its supporting libraries are updated in sdksdk manager, eclipse reports an error: This
Cause: After updating ADT and its supporting libraries in Sdksdk Manager, eclipse error: This Android SDK requires Android Developer Toolkit version 23.1 errors. But SDKSDK manager clearly shows that 23.1 of ADT is already installed, which is strange.。Workaround: Help,Install New software, ADD->http://dl-ssl.google.com
Long time no update, the recent phone on the alarm clock app does not have a good, so want to write a.The Android development environment is set up, so be careful to install the JDK first.1. Install Android StudioGoogle's Android development site has a Chinese version, without crossing GFW to access: https://developer.
1. Open the Run Android SDK Manager, Tool menu, select Options, open the Settings menu, tick "force https://...sources to be fetched using http://...", Then click Close, such as:2, set the Hostes file can be normal access to the computer Google Download CenterOpen the C:\Windows\System32\drivers\etc folder, double-click the Hosts file, select Open with Notepad, and add the following code to the Hosts file.7
= Build.VERSION.RELEASE;
LOG.D ("Get mobile phone system version-->", phonereleaseversion);
}
}
Do not forget permissions:
The result is as shown in figure:
Java Android access to mobile phone operating system related information
String phoneinfo = "Product:" + Android.os.Build.PRODUCT;
Phoneinfo + = ", Cpu_abi:" + Android.os.Bu
Absrtact: With the increasing features of Android, various Android SDK and Android simulator are also updated. For some reason, we need to look at their version number. Let me introduce you to the following specific methods:1 adb view An
[Learn Android while working on projects] Xiao Bai will encounter problems -- This Android SDK requires Android Developer Toolkit version 23.0.0 or abve, androidadt23.0.0Problem description:
In the previous article, we talked about reducing the adt
that when the Android SDK version is different, the GPS control code is also different. First, the GPS control code in version 2.2 and earlier is attached:
/*** A gps switch is implemented. If the current switch is disabled, the switch is enabled. If the current switch is enabled, the switch is disabled.* Applicable
Android Early version number is a bit "confusing", such as Android 2.2 corresponding to the ADT version of ADT-0.9.9The version of ADT that corresponds to Android 2.3 suddenly jumps to adt-8.0.0.zip.And the
Jpush [failed to get sdk version!], Jpushsdk
The error log is as follows:
5-31 12:47:40. 088 23896-23896 /? E/JIGUANG-JCore: [JCoreGlobal] Get sdk version fail! [Failed to get
Problem Description:The previous article about solving the appcompat_v7 problem to reduce the ADT version, so the old version 22.3.0 Ah, reopen Eclipse, immediately pop up:This Android SDK requires Android Developer Toolkit version
When Eclispe is enabled for Android beginners, This Android SDK requires Android Developer Toolkit version 23.0.0 or abve
When we perform Android development and configure the installation environment Eclispe
between minsdkversion and Targetsdkversion and Compilesdkversion is that they will be included in the final APK file, if you view the generated Androidmanifest.xml file, You'll see a label like this:uses-sdk android:targetSdkVersion="23" android:minSdkVersion="7" />If you set it up manually in the manifest file, you will find that Gradle ignores them when they are built (although other build systems may be explicitly dependent on them).In a comprehen
Specific relationships such as:For example, the Android Studio 2.0 release, which has a new feature "Instant Run", requires Android Gradle plugin version 2.0.0 above, then our project's. Gradle file requires the following configuration{ dependencies { classpath ‘com.android.tools.build:gradle:2.0.0‘ }}Android
If your C:/Android-SDK-Windows/toolsdirectory does not contain the executable file "adb.exe.
When you open eclipse, the android plug-in reports an error.
In this case, you should do the following:
First, change your environment variables to C:/Android-SDK-Windows/tools:/
senforcethreadchecking = Context.getapplicationinfo (). targetsdkversion >= Build.version_codes.JELLY_BEAN_MR2; if (senforcethreadchecking) {throw new RuntimeException (Throwable);}Android官方文档中提到, 随着Android新版本的发展,一些行为甚至appearances 可能发生改变。从前面两个例子已经可以看出。To summarize: When setting targetsdkversion to a higher value, it is likeAs in the Datepickerdialog example, there will beappearance enhanced benefits, b
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.